Skip to content

Update Curios API compatibility to 14.0.0+1.21.11#222

Merged
rubensworks merged 2 commits intomaster-1.21from
copilot/fix-curiosapi-compatibility-issue
Mar 19, 2026
Merged

Update Curios API compatibility to 14.0.0+1.21.11#222
rubensworks merged 2 commits intomaster-1.21from
copilot/fix-curiosapi-compatibility-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

CuriosApi.getCuriosHelper() was removed in Curios API 14.0.0, causing a crash when any mod registers a curio slot.

Changes

  • gradle.properties: Bump neoforge_curios_version from 7.3.4+1.20.414.0.0+1.21.11
  • InventoryLocationCurios.java: Replace removed getCuriosHelper().getEquippedCurios(player) (returned Optional<IItemHandlerModifiable>) with the new pattern via getCuriosInventory():
// Before
CuriosApi.getCuriosHelper().getEquippedCurios(player)
    .map(handler -> handler.getStackInSlot(slot))
    .orElse(ItemStack.EMPTY);

// After
CuriosApi.getCuriosInventory(player)
    .map(handler -> handler.getEquippedCurios().getStackInSlot(slot))
    .orElse(ItemStack.EMPTY);

getEquippedCurios() on ICuriosItemHandler now returns IItemHandlerModifiable directly (no longer Optional), so getInventory() is unaffected.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.puppycrawl.com
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-2e0d869fa8235758/dbs/java/working/files-to-index15233353291971199577.list --sourceArchiveDir=/tmp/codeql-scratch-2e0d869fa8235758/dbs/java/src --outputDir=/tmp/codeql-scratch-2e0d869fa8235758/dbs/java/trap/java (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>CuriosApi Compatibility Issue 1.21.11</issue_title>
<issue_description>

Issue type:

  • 🐛 Bug

Short description:

CuriosApi Compatibility Issue (it's just calling a method that doesn't exist any more)

Steps to reproduce the problem:

  1. Install all mods listed below
  2. Open Minecraft
  3. Create a world (any settings)
  4. Press 'C'
  5. Crash

Expected behaviour:

Not Crash


Versions:

  • This mod: 1.25.5-957
  • Minecraft: 1.21.11
  • Mod loader version: NeoForge 21.11.38

Other Mods: (all are latest as of 3/17/26)

  • Common Capabilities 2.9.7-330
  • Integrated Dynamics 1.24.1-1662
  • Integrated Tunnels 1.8.30-608
  • Integrated Terminals 1.6.6-738
  • Curios API 14.0.0
  • Sophisticated Core 1.4.9.1527
  • Sophisticated Backpacks 3.25.37.1587

Common thru Tunnels just needed as dependencies, Terminals is the one that adds the breaking behavior.
Sophisticated Core/Backpacks (from what I can tell from testing) is only really needed as a mod that registers a curio slot. My guess is that this could be substituted for any mod that does the same, but I haven't tested that. The crash did not occur without adding them in though.

Log file:

crash-2026-03-17_17.33.54-client.txt</issue_description>

<agent_instructions>Please fix this issue by updating Curios to 14.0.0+1.21.11.
Make sure to fix any compilation issues that may arise.
You may need to fix Minecraft update issues, since the old Curios support was written for an older Minecraft version.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@rubensworks

Thanks for reporting!


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@coveralls
Copy link

coveralls commented Mar 19, 2026

Coverage Status

coverage: 30.805%. remained the same
when pulling 893547c on copilot/fix-curiosapi-compatibility-issue
into 1148ef4 on master-1.21.

Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CuriosApi compatibility issue for version 1.21.11 Update Curios API compatibility to 14.0.0+1.21.11 Mar 19, 2026
@sonarqubecloud
Copy link

Copilot AI requested a review from rubensworks March 19, 2026 19:46
@rubensworks rubensworks marked this pull request as ready for review March 19, 2026 19:49
@rubensworks rubensworks merged commit b5d11c8 into master-1.21 Mar 19, 2026
6 checks passed
@rubensworks rubensworks deleted the copilot/fix-curiosapi-compatibility-issue branch March 19, 2026 19:49
@rubensworks rubensworks moved this from To Do to Done in Maintenance Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants